﻿<%@ Page Language="C#" AutoEventWireup="true" Inherits="backstage_brand_list" Codebehind="brand_list.aspx.cs" %>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>品牌管理</title>
    <link href="css/skin.css" rel="stylesheet" type="text/css" />
</head>

<script type="text/javascript" src="js/main.js"></script>

<script type="text/javascript" src="js/jquery.min.js"></script>

<script type="text/javascript" src="js/jquery.js"></script>

<body class="body">
    <table class="main" cellpadding="0" cellspacing="0">
        <tr>
            <td class="td_left_top">
                <img alt="" src="images/left-top-right.gif" /></td>
            <td class="td_middle_top">
                <div class="left_topbg">
                    <div class="titlebt">
                        品牌管理</div>
                </div>
            </td>
            <td class="td_right_top">
                <img alt="" src="images/nav-right-bg.gif" /></td>
        </tr>
        <tr>
            <td class="td_left_middle">
            </td>
            <td class="td_middle_middle">
                <div class="maincontent">
                    <form id="formSearch" action="brand_list.aspx">
                        <input id="btnAddBrand" type="button" class="formButton" value="添加品牌" onclick="location.href='brand.aspx?ot=ad';" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label>
                            查找：</label>
                        <select id="selectBrand" name="t">
                            <option value="brandName" selected="selected">品牌名称</option>
                            <option value="brandUrl">品牌网址</option>
                        </select>
                        <input id="txtKeyWord" type="text" name="kw" value="<%=kw %>" />
                        <input id="btnSearch" type="submit" class="formButton" value="搜  索" />
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <label>
                            每页显示：</label>
                        <select id="selectPageSize" name="ps" onchange="SetPageSize();">
                            <option value="10">10</option>
                            <option value="20" selected="selected">20</option>
                            <option value="50">50</option>
                            <option value="100">100</option>
                        </select>
                    </form>
                    <form id="form1" runat="server">
                        <table cellpadding="0" cellspacing="0">
                            <tr class="tr_title">
                                <td>
                                    <input name="chkall" value="1" type="checkbox" onclick="CheckAll(this,'Item')" title="全选/反选" />
                                </td>
                                <td>
                                    <span onclick="SetOrder('brandName');">品牌名称</span></td>
                                <td>
                                    <span onclick="SetOrder('brandUrl');">品牌网址</span></td>
                                <td>
                                    LOGO</td>
                                <td>
                                    <span onclick="SetOrder('sortOrder');">排序</span></td>
                                <td>
                                    <span onclick="SetOrder('createTime');">日期</span></td>
                                <td>
                                    操作</td>
                            </tr>
                            <asp:Repeater ID="rptBrand" runat="server" OnItemCommand="rptBrand_ItemCommand">
                                <ItemTemplate>
                                    <tbody>
                                        <tr>
                                            <td>
                                                <input id='cb<%# Eval("id") %>' name="Item" type="checkbox" onclick="ShowDelete();"
                                                    value='<%# Eval("id") %>' /></td>
                                            <td>
                                                <%# Eval("brandName")%>
                                            </td>
                                            <td>
                                                <a href="<%# Eval("brandUrl")%>" target="_blank" title="<%# Eval("brandName")%>">
                                                    <%# Eval("brandUrl")%>
                                                </a>
                                            </td>
                                            <td>
                                                <img alt="<%# Eval("brandName")%>" src="<%# Eval("brandLogo")%>" style="width: 88px;
                                                    height: 31px;" />
                                            </td>
                                            <td>
                                                <%# Eval("sortOrder")%>
                                            </td>
                                            <td>
                                                <%# Eval("createTime")%>
                                            </td>
                                            <td>
                                                <a href="brand.aspx?ot=ed&id=<%# Eval("id") %>">
                                                    <img src="images/edt.gif" alt="编辑" />编辑</a><asp:LinkButton ID='lbtDelete' runat="server"
                                                        CommandArgument='<%# Eval("id") %>' CommandName="del" OnClientClick="return confirm('确定要删除吗？');"
                                                        ToolTip="删除"><img src="images/del.gif" alt="删除" />删除</asp:LinkButton>
                                            </td>
                                        </tr>
                                    </tbody>
                                </ItemTemplate>
                                <FooterTemplate>
                                    <tr>
                                        <td colspan="10" style="text-align: center;">
                                            <label id="lblEmpty" style='display: <%# rptBrand.Items.Count==0?"block":"none"%>;
                                                color: Red;'>
                                                没有找到任何记录</label>
                                        </td>
                                    </tr>
                                </FooterTemplate>
                            </asp:Repeater>
                        </table>
                        <asp:Button ID="btnDelete" runat="server" Text="删除" OnClientClick="return confirm('确定要删除吗？');"
                            OnClick="btnDelete_Click" EnableViewState="false" CssClass="formButton" />
                        <% Response.Write((new Gift.WebApp.PageListNo()).DisplayPage(total, pageSize, pageIndex)); %>
                    </form>
                </div>
            </td>
            <td class="td_right_middle">
            </td>
        </tr>
        <tr>
            <td class="td_left_bottom" style="height: 17px">
                <img alt="" src="images/buttom_left2.gif" />
            </td>
            <td class="td_middle_bottom" style="height: 17px">
                <img alt="" src="images/buttom_bgs.gif" />
            </td>
            <td class="td_right_bottom" style="height: 17px">
                <img alt="" src="images/buttom_right2.gif" />
            </td>
        </tr>
    </table>
</body>
</html>
